Daniel Sabo [Mon, 10 Jun 2013 23:48:36 +0000 (16:48 -0700)]
Add SSE2 float -> byte conversions
Daniel Sabo [Mon, 10 Jun 2013 16:48:00 +0000 (09:48 -0700)]
Use Loren's gamma conversions for RGB, YA, and Y
Daniel Sabo [Tue, 30 Apr 2013 18:52:51 +0000 (11:52 -0700)]
Lookup table based conversions for cairo-ARGB32
Because who doesn't love giant lookup tables?
Daniel Sabo [Fri, 31 May 2013 22:09:45 +0000 (15:09 -0700)]
Add two-table header to sources
Daniel Sabo [Fri, 31 May 2013 20:35:43 +0000 (13:35 -0700)]
Add two-table gamma conversions
This is kind of a silly conversion method, but it
works and nothing faster has been forthcoming.
Daniel Sabo [Fri, 31 May 2013 20:25:28 +0000 (13:25 -0700)]
Add some float conversions for grey
Loren Merritt [Mon, 29 Apr 2013 09:49:18 +0000 (09:49 +0000)]
SSE2-optimized gamma correction
7x faster than the scalar implementation.
(4x the obvious way from simd, and the other 1.75x because I'm exploiting
knowledge of the ieee754 float format rather than using portable frexp().)
Loren Merritt [Thu, 25 Apr 2013 17:50:53 +0000 (17:50 +0000)]
Optimize gamma correction
Switch from Chebyshev polynomial to Newton's method, which is both simpler and
1.5x faster for the same precision.
Daniel Sabo [Tue, 30 Apr 2013 03:18:07 +0000 (20:18 -0700)]
Remove rgbA float <-> rgba float from gggl-lies
It clamps alpha when babl expects it not to.
Daniel Sabo [Tue, 30 Apr 2013 03:13:10 +0000 (20:13 -0700)]
gggl.c: Remove dead code
Daniel Sabo [Tue, 30 Apr 2013 02:59:15 +0000 (19:59 -0700)]
gggl-lies.c: Remove dead code
Daniel Sabo [Tue, 30 Apr 2013 02:43:41 +0000 (19:43 -0700)]
Show the details of the fish that caused a failure
Daniel Sabo [Tue, 30 Apr 2013 01:10:25 +0000 (18:10 -0700)]
Re-enable gggl-lies
It was not the source of the troubles I had blamed it for.
Michael Natterer [Sun, 7 Apr 2013 15:27:34 +0000 (17:27 +0200)]
tests: fix the HSV tests
Michael Natterer [Sun, 7 Apr 2013 14:04:49 +0000 (16:04 +0200)]
extensions: HSV.o: return the number of samples processed, not always 0
Michael Natterer [Sun, 7 Apr 2013 13:58:16 +0000 (15:58 +0200)]
extensions: change the range of H in HSV.o from 0..360 to 0..1
Daniel Sabo [Sat, 6 Apr 2013 09:13:11 +0000 (02:13 -0700)]
Fix missing AC_MSG_RESULT
Daniel Sabo [Sat, 6 Apr 2013 03:11:03 +0000 (20:11 -0700)]
Use QueryPerformanceCounter for babl_ticks on Win32
Daniel Sabo [Sat, 30 Mar 2013 15:48:52 +0000 (08:48 -0700)]
Add SSE2 conversions
This patch includes two conversions for RaGaBaA -> RGBA. Depending
on the CPU either spin or shuffle is significantly faster. Unless
I can find a consistently fast version I'm going to let them fight
it out in the babl startup benchmarks.
Daniel Sabo [Sat, 6 Apr 2013 03:47:56 +0000 (20:47 -0700)]
Disable gegl-lies conversions
They lazy table generation these conversions use causes
babl to overestimate their cost while also overestimating
their accuracy.
I used "#if 0" rather than disabling the library because I
want to ensure the conversion gets removed without people
needing to do rm lib/babl-0.1/*
Daniel Sabo [Sat, 6 Apr 2013 03:45:00 +0000 (20:45 -0700)]
Remove duplicate conversions in gggl and gggl-lies
Daniel Sabo [Sat, 30 Mar 2013 03:14:40 +0000 (20:14 -0700)]
Remove gggl rgbA <-> rgba
Daniel Sabo [Wed, 30 Jan 2013 02:41:44 +0000 (18:41 -0800)]
Minimal float -> u8, u16 conversions
Add some simplistic but "accurate" float -> u8 and float -> u16
conversions to make more non-reference paths usable.
The main difference from the existing conversions is that these
clamp out of range values and make the path error checker happy.
I also had to fudge the float-to-8bit slightly because the prior
values cause it to check for the rounding on an exact 0.5 value.
Daniel Sabo [Thu, 7 Feb 2013 19:24:12 +0000 (11:24 -0800)]
Add --disable-docs option to configure
Daniel Sabo [Tue, 29 Jan 2013 10:13:24 +0000 (02:13 -0800)]
Add introspection function for BablFishPath
Daniel Sabo [Tue, 29 Jan 2013 00:26:56 +0000 (16:26 -0800)]
Install babl-introspect.h
Daniel Sabo [Sun, 9 Dec 2012 20:48:32 +0000 (12:48 -0800)]
Fix babl-stats page encoding for Firefox
Add <meta Content-Type> to babl-stats.html so Firefox renders
it with the correct encoding.
Massimo Valentini [Wed, 5 Dec 2012 18:22:36 +0000 (19:22 +0100)]
babl: always allocate enough memory
Massimo Valentini [Wed, 5 Dec 2012 17:52:16 +0000 (18:52 +0100)]
babl: don't crash processing same format models
with different component number
Massimo Valentini [Wed, 5 Dec 2012 17:52:03 +0000 (18:52 +0100)]
babl: fix conversion path cost evaluation
and silence compiler warnings
Jehan [Mon, 26 Nov 2012 11:51:17 +0000 (20:51 +0900)]
Update tests/ gitignore.
Massimo Valentini [Fri, 24 Aug 2012 08:06:01 +0000 (10:06 +0200)]
Revert "tests: adjust float to 8bit regression test for new sRGB precision"
This reverts commit
2675787f341ce259f9abec3e326b5efece45ecbf.
the literal 0.3 assigned to a float is approximated to a number
slightly greater than 0.3 (3/10) ->
lrint ((0.3 + epsilon) * 255) == lrint (76.5 + 255 * epsilon) == 77
Jehan [Tue, 20 Nov 2012 16:10:22 +0000 (01:10 +0900)]
AUTHORS: markup and email fix.
Jehan [Tue, 20 Nov 2012 16:06:06 +0000 (01:06 +0900)]
Bug 688217 - cleaning out an unneeded include of stdint.h.
Øyvind Kolås [Mon, 19 Nov 2012 20:39:43 +0000 (21:39 +0100)]
AUTHORS: markup fixup
Øyvind Kolås [Mon, 19 Nov 2012 01:32:44 +0000 (02:32 +0100)]
update AUTHORS file
Jehan [Wed, 14 Nov 2012 04:26:06 +0000 (13:26 +0900)]
Bug 688217 - relies on actual DLL path for locating lib directory on Windows.
Øyvind Kolås [Wed, 14 Nov 2012 01:02:00 +0000 (02:02 +0100)]
get rid of process_chunks
Øyvind Kolås [Wed, 14 Nov 2012 00:36:50 +0000 (01:36 +0100)]
Move chuking of stack allocated buffer to innermost loop
Moves the logic to the only place where it is needed, speeding up the other,
more likely and hopeful code path by not needing to do the conditionals at
all.
Øyvind Kolås [Tue, 13 Nov 2012 22:06:21 +0000 (23:06 +0100)]
Michael Henning <drawoc@darkrefraction.com>
Clean up babl_process_chunks a bit.
Øyvind Kolås [Sat, 27 Oct 2012 23:08:56 +0000 (01:08 +0200)]
lower max stack alloced buffer size to 14000px (for win32)
Øyvind Kolås [Sat, 27 Oct 2012 20:17:34 +0000 (22:17 +0200)]
reduce size of max tempbuffer, and do chunking in fewer cases
Chunking is now only done for multi-step fish paths and reference conversions.
Øyvind Kolås [Sat, 27 Oct 2012 17:47:52 +0000 (19:47 +0200)]
Limit the size of temporary buffers used by babl.
This might fix the issue reported in Bug 686557, though more logic can be
applied, only do this if it is a multi-step conversion and temporary buffers
would actually be needed.
Michael Muré [Tue, 28 Aug 2012 07:02:31 +0000 (16:02 +0900)]
HSV and test: minor style cleaning before merge
Maxime Nicco [Fri, 27 Jul 2012 10:57:52 +0000 (12:57 +0200)]
HSV test
Factorize code
Maxime Nicco [Thu, 26 Jul 2012 16:05:51 +0000 (18:05 +0200)]
HSV add test
Maxime Nicco [Thu, 26 Jul 2012 16:02:38 +0000 (18:02 +0200)]
HSV fix Makefile
Maxime Nicco [Wed, 25 Jul 2012 10:04:55 +0000 (12:04 +0200)]
HSV Cleanup
Maxime Nicco [Wed, 25 Jul 2012 10:01:39 +0000 (12:01 +0200)]
Rename Naive-HSV in HSV
Maxime Nicco [Wed, 25 Jul 2012 09:32:31 +0000 (11:32 +0200)]
Adding HSV Conversion
implement conversion between rvba and hsvba float
Øyvind Kolås [Sat, 25 Aug 2012 14:22:20 +0000 (16:22 +0200)]
babl: further increase the number of pixels verified
Øyvind Kolås [Sat, 25 Aug 2012 14:11:23 +0000 (16:11 +0200)]
babl: increase number of pixels in tests ~8 times
This makes 32bit systems also trip up on many more possible !8bpc
discrpeancies.
Øyvind Kolås [Thu, 23 Aug 2012 08:30:32 +0000 (10:30 +0200)]
tests: adjust float to 8bit regression test for new sRGB precision
Øyvind Kolås [Thu, 23 Aug 2012 08:26:29 +0000 (10:26 +0200)]
Adjust constants used for sRGB gamma
Spotted by Elle Stone and clarified by Graeme Gill, now updated to Current IEC
specification values.
Jon Nordby [Wed, 1 Aug 2012 10:49:04 +0000 (12:49 +0200)]
build: Fix distcheck by disting tests/introspection.py
Jon Nordby [Wed, 1 Aug 2012 10:47:00 +0000 (12:47 +0200)]
build: Use 'rsvg-convert' instead of 'rsvg'
rsvg was made obsolete a long time ago by rsvg-convert, and
was removed in librsvg 2.35.2. rsvg-convert is available
from at least librsvg 2.26.2 (Debian Squeeze).
Øyvind Kolås [Tue, 31 Jul 2012 18:53:01 +0000 (20:53 +0200)]
extensions: #define _POSIX_C_SOURCE for lrint
Øyvind Kolås [Tue, 31 Jul 2012 18:45:36 +0000 (20:45 +0200)]
extensions: cairo - remove unused lut_linear table
Jon Nordby [Tue, 31 Jul 2012 16:19:02 +0000 (18:19 +0200)]
introspection: Add GI/GTKDoc style symbol references to comments
Jon Nordby [Mon, 30 Jul 2012 14:35:17 +0000 (16:35 +0200)]
introspection: Pass --warn-all to g-ir-scanner
Jon Nordby [Mon, 30 Jul 2012 14:34:18 +0000 (16:34 +0200)]
configure.ac: Fix typo in check for GI >= 1.33.5
Jon Nordby [Sun, 29 Jul 2012 13:39:27 +0000 (15:39 +0200)]
tests: Add test setup for introspection bindings in Python
This is essentially all we can test for now, as the
methods using the Babl type are show up with 'introspectable="1"'.
Øyvind Kolås [Mon, 30 Jul 2012 20:48:57 +0000 (22:48 +0200)]
extensions: make fastpath for R'G'B'A u8 to cairo-ARGB32 have 0 error
Alexia Death [Fri, 27 Jul 2012 18:49:35 +0000 (21:49 +0300)]
extensions: add fastpath for R'G'B'A u8 to cairo-ARGB32 conversion
Jon Nordby [Sun, 29 Jul 2012 13:06:03 +0000 (15:06 +0200)]
introspection: Babl.BablObject -> Babl.Object
Jon Nordby [Fri, 27 Jul 2012 20:00:46 +0000 (22:00 +0200)]
Bug 673422 - Babl C type not accessible to introspection bindings
https://bugzilla.gnome.org/show_bug.cgi?id=673422
Annotate Babl C type to be Babl.Object in GIR using the
"rename to" annotation in GI 1.33.5+. For earlier versions,
use a static .gir file to achieve the same.
Øyvind Kolås [Fri, 27 Jul 2012 19:13:12 +0000 (21:13 +0200)]
Revert "Add simple test app to test pow-24 accuracy"
commit
dc824c0ac704b35130aff44e544e8666e21b5bc5 which was pushed by accident.
Øyvind Kolås [Fri, 27 Jul 2012 19:09:59 +0000 (21:09 +0200)]
Revert "extensions/gggl{,-lies}.c: do not register the same conversion twice or +"
This reverts commit
bc66f5ae8a98896f360549cb87cbbfae77d176df
The conversions in gggl and gggl-lies are not the same, even though the lines
registering them seem identical; their effect is different since the same
names refer to different pixel formats. Further restructuring these
conversions and getting rid of the gggl legacy naming of them might be
beneficial..
Alexander Larsson [Mon, 18 Jun 2012 13:17:51 +0000 (15:17 +0200)]
Add simple test app to test pow-24 accuracy
https://bugzilla.gnome.org/show_bug.cgi?id=678318
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: do not register the same conversion twice or +
grep "o (" extensions/gggl.c | sort | uniq -d
grep "o (" extensions/gggl-lies.c | sort | uniq -d
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: round toward nearest in integer unpremultiplication
from (docs/BablFishPath.html):
../extensions/.libs/gggl-lies.so 0: RaGaBaA u8 to RGBA u8
error: 0.001425 cost: 81 processings: 1 pixels: 128
../extensions/.libs/gggl.so 0: R'aG'aB'aA u8 to R'G'B'A u8
error: 0.001971 cost: 71 processings: 1 pixels: 128
../extensions/.libs/gggl.so 0: R'aG'aB'aA u8 to R'G'B' u8
error: 0.001971 cost: 71 processings: 1 pixels: 128
to:
../extensions/.libs/gggl-lies.so 0: RaGaBaA u8 to RGBA u8
error: 0.000031 cost: 81 processings: 1 pixels: 128
../extensions/.libs/gggl.so 0: R'aG'aB'aA u8 to R'G'B'A u8
error: 0.000042 cost: 61 processings: 1 pixels: 128
../extensions/.libs/gggl.so 0: R'aG'aB'aA u8 to R'G'B' u8
error: 0.000042 cost: 61 processings: 1 pixels: 128
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: fix a Fixme: (>>8 vs /255)
division per 0x100-1 is implemented using 1 term of (1 + x)^-1
MacLaurin expansion
(1+x)^-1 == 1 + (-1) x
a * (1 - 1/256)^-1 * (256^-1) == (a + a / 256) / 256
with integer division rounded toward the nearest.
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: use 'lrint' where it is not yet used
and instead of 'rint'.
'lrint' returning a long does not require a conversion double->int
that in theory requires changing the rounding direction from
toward the nearest to toward zero.
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: fix conversions u16 <-> u8
u16 maximum value is 0x10000 - 1 == (0x100 - 1) (0x100 + 1)
u8 maximum value is 0x100 - 1
thus the direct conversion requires multiplication/division per
0x100+1
division per 0x100+1 is implemented using 1 term of (1 + x)^-1
MacLaurin expansion
(1+x)^-1 == 1 + (-1) x
a * (1 + 1/256)^-1 * (256^-1) == (a - a / 256) / 256
with integer division rounded toward the nearest.
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: reduce errors of table-based conversions
centering the sample within the range of floats it represents
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl.c: move table-based conversions in #ifdef USE_TABLES
and the corresponding not using tables in the #else branch
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
babl: don't write anything if dest model lacks a source component
otherwise converting cairo-RGB24 to R'G'B' overwrites the red
component with the PAD.
Massimo Valentini [Sat, 14 Jul 2012 15:07:37 +0000 (17:07 +0200)]
tests: add a test for conversions cairo-RGB24 <-> R'G'B' u8
Michael Muré [Mon, 25 Jun 2012 10:22:27 +0000 (19:22 +0900)]
index-static.html.in: correct usage example
* babl_fish return a const Babl*
* better naming
Michael Muré [Mon, 25 Jun 2012 10:20:30 +0000 (19:20 +0900)]
index-static.html.in: force utf-8 charset in <head>
Alexander Larsson [Mon, 18 Jun 2012 10:58:47 +0000 (12:58 +0200)]
Use new approximations for gamma conversions
https://bugzilla.gnome.org/show_bug.cgi?id=678318
Alexander Larsson [Mon, 18 Jun 2012 10:58:12 +0000 (12:58 +0200)]
Add fast approximations of x^2.4 and x^(1/2.4)
Use a chebyshev polynominal approximation of these to speed up
gamma conversion. Based on the post in:
http://stackoverflow.com/questions/
6475373/optimizations-for-pow-with-const-non-integer-exponent/
6478839#
6478839
https://bugzilla.gnome.org/show_bug.cgi?id=678318
Michael Muré [Wed, 23 May 2012 06:21:52 +0000 (15:21 +0900)]
update .gitignore
Michael Muré [Tue, 22 May 2012 03:48:44 +0000 (12:48 +0900)]
sse-fixups: use more portable functions to help compile with clang
Original patch found here
http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11/babl/files/patch-sse-fixups.c?rev=1.1;content-type=text%2Fplain
CVS tags: RELEASE_8_3_0, HEAD
Fix the build with clang.
PR: ports/163518
Submitted by: Jan Beich <jbeich@tormail.net>
Feature safe: yes
Martin Nordholts [Fri, 18 May 2012 11:33:54 +0000 (13:33 +0200)]
fixup! tests: Avoid rounding error and correct source pixels
Martin Nordholts [Fri, 18 May 2012 11:31:38 +0000 (13:31 +0200)]
tests: Avoid rounding error and correct source pixels
In float-to-8bit.c and "float -> u8 6", change 0.3 to 0.301 since 0.3
/ 0.6 * 255 = 127.5, so the slightest platform specific rounding error
will give different results for u8 (127 or 128).
Also correct G'a and B'a values in the third pixel to match expected
values, the source values seems to have forgotten about
premultiplication.
Øyvind Kolås [Wed, 2 May 2012 23:20:29 +0000 (01:20 +0200)]
add a u15 type that is 16bit only using 15bits
Michael Natterer [Mon, 7 May 2012 20:54:44 +0000 (22:54 +0200)]
configure: don't set SHREXT to .dylib on darwin
libtool creates .so modules anyway (modules not libs!)
Øyvind Kolås [Fri, 4 May 2012 22:04:59 +0000 (00:04 +0200)]
add fast paths for conversions to cairo-RGB24
Øyvind Kolås [Fri, 4 May 2012 21:34:11 +0000 (23:34 +0200)]
do not repeat test many many times
Massimo Valentini [Fri, 4 May 2012 17:04:30 +0000 (19:04 +0200)]
extensions: cairo ARGB format is premultiplied
Massimo Valentini [Fri, 4 May 2012 17:04:03 +0000 (19:04 +0200)]
babl: initialize 'palette' babl-format member
otherwise non-palette formats could be mistakenly used as palette
Simon Budig [Thu, 3 May 2012 11:32:55 +0000 (13:32 +0200)]
fix a warning
Øyvind Kolås [Wed, 2 May 2012 21:51:10 +0000 (23:51 +0200)]
fix cpu-accel test for 64bit
Øyvind Kolås [Wed, 2 May 2012 21:48:54 +0000 (23:48 +0200)]
only enable sse-fixups when not on 64bit
Øyvind Kolås [Wed, 2 May 2012 21:10:16 +0000 (23:10 +0200)]
tests: add more float->8bit tests
Øyvind Kolås [Wed, 2 May 2012 21:00:46 +0000 (23:00 +0200)]
tests: split utility function out into common.inc
Øyvind Kolås [Wed, 2 May 2012 00:34:42 +0000 (02:34 +0200)]
directly use stdint types in half-float reference code
Øyvind Kolås [Wed, 2 May 2012 00:27:19 +0000 (02:27 +0200)]
use stdint types for sized data types
Øyvind Kolås [Tue, 1 May 2012 11:40:28 +0000 (13:40 +0200)]
also test >1.0 values when converting from float to u8